﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraBars.Helpers;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using ManageEmployees.Properties;


namespace ManageEmployees
{
    public partial class fMaster : XtraForm
    {
        public fMaster()
        {
            InitializeComponent();
            InitSkinGallery();

        }

        #region Skin Gallery
        void InitSkinGallery()
        {
            SkinHelper.InitSkinGallery(rgbiSkins, true);
        }
        #endregion

        #region Form Load
        private void fMaster_Load(object sender, EventArgs e)
        {
            Text = Resources.Application;
        }
        #endregion

        #region Register data
        #endregion

        #region Waiting Eeceive Data
        #endregion

        #region Events
        private void fMaster_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (XtraMessageBox.Show(Resources.ApplicationExit, Resources.Notification, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                Dispose();
                e.Cancel = false;
            }
            else
            {
                e.Cancel = true;
            }
        }

        private void fMaster_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                Close();
            }
        }
        #endregion

        #region Events System
        private void iManagement_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

        }

        private void iLogin_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            new fLogin().ShowDialog();
        }

        private void iChangePassword_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            new fPasswordChange().ShowDialog();
        }

        private void iInfomation_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            new fEmployeeBaseInfo().ShowDialog();
        }

        private void iExit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Close();
        }
        #endregion

        #region Management Generic
        private void iDepartment_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            new fOrganizarions().ShowDialog();
        }
        #endregion

        #region Functions
        #endregion
    }
}